package anim.objekti;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Point;

/**
 * @author Aleksandar Stancic
 */

public class ObojeniRect extends Objekat {
	private Color boja = Color.blue, okvir = Color.black;
	
	public ObojeniRect(Point p, Dimension d, Color b, Color o) {
		super(p, d);
		
		boja = b;
		okvir = o;
	}

	@Override
	public void crtaj(Graphics2D g) {
		g.setColor(boja);
		g.fillRect(poz.x, poz.y, dim.width, dim.height);
		g.setColor(okvir);
		g.drawRect(poz.x, poz.y, dim.width, dim.height);
	}
	
	public void setPozadina(Color bg)
	{
		boja = bg;
	}

}
